test_yaml_file.hs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. -- Copyright 2015 Peter Harpending
  2. --
  3. -- Licensed under the Apache License, Version 2.0 (the "License"); you
  4. -- may not use this file except in compliance with the License. You
  5. -- may obtain a copy of the License at
  6. --
  7. -- http://www.apache.org/licenses/LICENSE-2.0
  8. --
  9. -- Unless required by applicable law or agreed to in writing, software
  10. -- distributed under the License is distributed on an "AS IS" BASIS,
  11. -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  12. -- implied. See the License for the specific language governing
  13. -- permissions and limitations under the License.
  14. -- |
  15. -- Module : Main
  16. -- Description : Test of editor-open
  17. -- Copyright : Copyright 2015 Peter Harpending
  18. -- License : Apache-2.0
  19. -- Maintainer : Peter Harpending <peter@harpending.org>
  20. -- Stability : experimental
  21. -- Portability : POSIX
  22. --
  23. module Main where
  24. import qualified Data.ByteString as B
  25. import Paths_editor_open
  26. import System.IO
  27. import Text.Editor
  28. main :: IO ()
  29. main =
  30. getDataFileName "res/bug-schema.yaml" >>=
  31. runUserEditorDWIMFile yamlTemplate >>=
  32. B.hPut stdout