on 54dfb21 help sign in
elk/src/Elm/Compiler/Version.hs
26 lines 544 B history raw
1{-# OPTIONS_GHC -Wall #-}
2module Elm.Compiler.Version (version) where
4import qualified Data.Version as Version
5import qualified Paths_elm_compiler as This
6import Elm.Package
9rawVersion :: [Int]
10rawVersion =
11 Version.versionBranch This.version
13version :: Version
14version =
15 case rawVersion of
16 major : minor : patch : _ ->
17 Version major minor patch
19 [major, minor] ->
20 Version major minor 0
22 [major] ->
23 Version major 0 0
25 [] ->
26 error "could not detect version of elm-compiler you are using"