code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE TemplateHaskell #-}
makeLenses '' PostscriptFont
| mpickering/ghc-exactprint | tests/examples/ghc710/SpacesSplice.hs | bsd-3-clause | 74 | 0 | 6 | 19 | 10 | 4 | 6 | 2 | 0 |
{-# LANGUAGE CPP, DeriveDataTypeable #-}
{-# OPTIONS -Wall #-}
module Language.Paraiso.Optimization.Identity (
identity
) where
import qualified Data.Graph.Inductive as FGL
import qualified Language.Paraiso.Annotation as Anot
import Language.Paraiso.Prelude
import Language.Paraiso.OM.Gra... | nushio3/Paraiso | Language/Paraiso/Optimization/Identity.hs | bsd-3-clause | 576 | 0 | 9 | 115 | 108 | 67 | 41 | 13 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Yi.Paths ( getEvaluatorContextFilename
, getConfigFilename
, getConfigModules
, getArticleDbFilename
, getPersistentStateFilename
, getConfigDir
... | TOSPIO/yi | src/library/Yi/Paths.hs | gpl-2.0 | 3,295 | 0 | 12 | 842 | 495 | 276 | 219 | 47 | 3 |
{-# LANGUAGE TemplateHaskell, QuasiQuotes, DeriveDataTypeable #-}
import Control.Monad hiding (void)
import Data.Typeable
import Language.C.Quote.ObjC
import Language.C.Inline.ObjC
objc_import ["<Foundation/Foundation.h>"]
newtype NSString = NSString (ForeignPtr NSString)
deriving Typeable -- needed for now unt... | beni55/language-c-inline | tests/objc/marshal-array/Main.hs | bsd-3-clause | 1,819 | 3 | 13 | 314 | 470 | 257 | 213 | 35 | 1 |
{-|
Module : Language.Qux.Annotated.TypeResolver
Description : Type resolving functions that transform the abstract syntax tree to a typed one.
Copyright : (c) Henry J. Wylde, 2015
License : BSD3
Maintainer : hjwylde@gmail.com
Type resolving functions that transform the abstract syntax tree to a typed one... | qux-lang/language-qux | src/Language/Qux/Annotated/TypeResolver.hs | bsd-3-clause | 5,452 | 0 | 15 | 1,261 | 1,323 | 676 | 647 | 84 | 11 |
{-# Language PatternGuards #-}
module Blub
( blub
, foo
, bar
) where
import Control.Applicative
(r, t, z)
import Ugah.Blub
( a
, b
, c
)
import Data.Text
f :: Int -> Int
f = (+ 3)
r :: Int -> Int
r =
| dan-t/hsimport | tests/goldenFiles/SymbolTest49.hs | bsd-3-clause | 229 | 1 | 6 | 74 | 83 | 52 | 31 | -1 | -1 |
module Hpack.HaskellSpec (spec) where
import Test.Hspec
import Hpack.Haskell
spec :: Spec
spec = do
describe "isModule" $ do
it "accepts module names" $ do
isModule ["Foo", "Bar"] `shouldBe` True
it "rejects the empty list" $ do
isModule [] `shouldBe` False
describe "isQ... | haskell-tinc/hpack | test/Hpack/HaskellSpec.hs | mit | 845 | 0 | 15 | 208 | 241 | 118 | 123 | 22 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import System.Random
import System.Environment
import Debug.Trace
import Data.List
import Control.DeepSeq
import Data.Map (Map)
import qualified Data.Map as Map
-- ----------------------------------------------------------------------------
-- <<Talk
newtype Talk = Talk Int
deri... | lywaterman/parconc-examples | timetable1.hs | bsd-3-clause | 3,689 | 0 | 15 | 914 | 1,330 | 736 | 594 | 81 | 2 |
module Lit where
{-@ test :: {v:Int | v == 30} @-}
test = length "cat"
| mightymoose/liquidhaskell | tests/neg/lit.hs | bsd-3-clause | 72 | 0 | 5 | 17 | 13 | 8 | 5 | 2 | 1 |
{-# LANGUAGE CPP #-}
#if !(MIN_VERSION_base(4,6,0))
{-# LANGUAGE MagicHash, UnboxedTuples #-}
#endif
module Distribution.Server.Util.SigTerm (onSigTermCleanShutdown) where
import System.Posix.Signals
( installHandler
, Handler(Catch)
, softwareTermination
)
import Control.Exception... | mpickering/hackage-server | Distribution/Server/Util/SigTerm.hs | bsd-3-clause | 1,538 | 0 | 13 | 405 | 318 | 174 | 144 | 38 | 2 |
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ma... | jcgruenhage/dendrite | vendor/src/github.com/apache/thrift/test/hs/ThriftTestUtils.hs | apache-2.0 | 2,088 | 0 | 10 | 370 | 343 | 193 | 150 | 26 | 1 |
{-# LANGUAGE Safe #-}
module Main where
import M_SafePkg3
main = do
putStrLn $ show bigInt
| urbanslug/ghc | testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly04.hs | bsd-3-clause | 98 | 0 | 8 | 23 | 23 | 13 | 10 | 5 | 1 |
module LilRender.Color.Named where
import LilRender.Color
aliceBlue = RGBColor { _red=240, _green=248, _blue=255 }
antiqueWhite = RGBColor { _red=250, _green=235, _blue=215 }
aquamarine = RGBColor { _red=127, _green=255, _blue=212 }
azure = RGBColor { _red=240, _green=255, _blue=255 }
beige = RGBColor { _red=245, _gr... | SASinestro/lil-render | src/LilRender/Color/Named.hs | isc | 7,658 | 0 | 6 | 1,087 | 3,387 | 2,168 | 1,219 | 137 | 1 |
{-# LANGUAGE CPP #-}
module Jakway.Blackjack.Tests.DatabaseTests.BasicTests (tests) where
import Jakway.Blackjack.Tests.DatabaseTests.Common
import Jakway.Blackjack.AI
import System.Directory
import Database.HDBC
import Database.HDBC.Sqlite3
import Database.HDBC.Session (withConnectionIO')
import Test.HUnit
import Con... | tjakway/blackjack-simulator | test/Jakway/Blackjack/Tests/DatabaseTests/BasicTests.hs | mit | 8,253 | 0 | 20 | 2,373 | 1,701 | 869 | 832 | 119 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
-- import Data.Conduit
import Control.Lens
import Data.Aeson
import Data.Aeson.Lens
import qualified Data.HashMap.Strict as H
import Data.Maybe (isNothing)
import Data.Text ... | yogsototh/muraine | src/Main.hs | mit | 12,419 | 0 | 18 | 4,238 | 2,559 | 1,365 | 1,194 | -1 | -1 |
import Data.List (nub, foldl')
import qualified Data.Map.Strict as Map
-- Pairs (small side, perimeter) of all square triangles whose perimeter is not greater than 1000
triangles :: [(Int, Int)]
triangles = nub [(l*min a b, l*p) | m <- [1..16],
n <- [1..m-1],
... | dpieroux/euler | 0/0039.hs | mit | 948 | 0 | 13 | 321 | 323 | 180 | 143 | 16 | 2 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
import Data.Foldable (for_)
import Data.List (sort)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Triplet (tripletsWithSum)
main :: IO ()
main = hspecWith defaultConfig {config... | exercism/xhaskell | exercises/practice/pythagorean-triplet/test/Tests.hs | mit | 1,825 | 0 | 11 | 857 | 465 | 294 | 171 | 44 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SVGAnimatedBoolean
(setBaseVal, getBaseVal, getAnimVal, SVGAnimatedBoolean(..),
gTypeSVGAnimatedBoolean)
... | ghcjs/jsaddle-dom | src/JSDOM/Generated/SVGAnimatedBoolean.hs | mit | 1,853 | 0 | 10 | 210 | 460 | 284 | 176 | 25 | 1 |
import Control.Monad (when)
import Data.List (isInfixOf)
import qualified Data.Map as M (Map, fromList)
import Data.Maybe (fromMaybe)
import System.Environment (getEnv)
import ... | fizzoo/dotfiles | xmonad.hs | mit | 5,565 | 0 | 18 | 1,576 | 1,671 | 960 | 711 | 111 | 1 |
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
module Homework.Week07.StringBuffer where
import Data.Monoid
import Homework.Week07.Buffer
instance Buffer String where
toString = id
fromString = id
line n b = safeIndex n (lines b)
replaceLine n l b = unlines . uncurry replaceLine' . split... | laser/cis-194-spring-2017 | src/Homework/Week07/StringBuffer.hs | mit | 663 | 0 | 10 | 174 | 249 | 129 | 120 | 18 | 1 |
import Control.Monad (guard)
double :: [a] -> [a]
double [] = []
double (x : xs) = x : x : double xs
main = do
guard $ (double []::[Int]) == []
guard $ double [5, 5] == [5, 5, 5, 5]
guard $ double [2, 5, 3] == [2, 2, 5, 5, 3, 3]
| rtoal/ple | haskell/double.hs | mit | 243 | 0 | 11 | 69 | 169 | 93 | 76 | 8 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module HotDB.Core.Commit (
Commit(..)
, TaggedCommit
, UserId
, Timestamp
, CommitId
, emptyCommitId
) where
import Control.Applicative
import Data.ByteString (ByteString)
import qualified Data.ByteString.Base16 as Base16
import qualified Data.ByteString.Lazy as LB
import Data.Int... | jjwchoy/hotdb | src/HotDB/Core/Commit.hs | mit | 1,698 | 0 | 12 | 249 | 510 | 298 | 212 | 48 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Demiurge.World where
import Prelude hiding (any)
import Control.Applicative((<$>))
import Data.Foldable(any)
import Data.Maybe
import Control.Monad (join)
import qualified Data.Map as Map
import Antiqua.Game
import Antiqua.Graphics.Renderer
import Antiqua.Graphics.TileRend... | olive/demiurge | src/Demiurge/World.hs | mit | 8,492 | 0 | 21 | 2,422 | 3,682 | 1,896 | 1,786 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
-- | The command line options
module NicoLang.CliOptions
( NicoRunOptions (..)
, nicoRunOptions
) where
import Data.Data (Data, Typeable)
import System.Console.CmdArgs ((&=), name, help, explicit, program, summary, args)
data NicoRunOptions = NicoRunOptions
{ nicoRunTarget... | aiya000/nico-lang | app/NicoLang/CliOptions.hs | mit | 982 | 0 | 12 | 197 | 219 | 126 | 93 | 20 | 1 |
module Configuration where
import Data.Monoid ((<>))
import Data.Version (showVersion)
import Data.Text (Text, pack, unpack)
import Network.AWS.Data.Text (fromText)
import Network.AWS.Types (LogLevel(..), Region)
import qualified Network.AWS.CloudFormation.Types as CFN... | SEEK-Org/evaporate | src/Configuration.hs | mit | 5,118 | 0 | 13 | 1,841 | 925 | 503 | 422 | 121 | 1 |
import Control.Applicative
import Data.Time.Calendar
import Data.Time.Calendar.OrdinalDate
main = print $ length sundays
sundays = filter isSunday firsts
firsts = (,,) <$> [1901..2000] <*> [1..12] <*> [1]
isSunday (y,m,d) = (snd $ sundayStartWeek $ fromGregorian y m d) == 0
| stu-smith/project-euler-haskell | Euler-019.hs | mit | 290 | 0 | 8 | 54 | 114 | 64 | 50 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad.Trans.State (runState)
import Data.ByteString.Char8 (pack, unpack)
import Data.Maybe (listToMaybe)
import qualified Data.List.NonEmpty as NE
import System.ZMQ4 (version)
import System.ZMQ4.Monadic
(runZMQ, socket, Socket, Router(..), Pub(... | elkorn/bidder | src/Bidder/Server/Main.hs | mit | 3,897 | 0 | 14 | 1,104 | 1,115 | 557 | 558 | 105 | 2 |
module Immediate.GenerateJs where
import Immediate.Syntax
import qualified Language.ECMAScript3.Syntax as JS
import qualified Language.ECMAScript3.Syntax.QuasiQuote as JsQ
import GHC.Real
import Data.List (intercalate)
runtime = var "___runtime"
runtimeMkThunk = JS.DotRef() runtime $ JS.Id() "mkthunk"
var = JS.VarRe... | edofic/core.js | src/Immediate/GenerateJs.hs | mit | 4,835 | 0 | 17 | 973 | 2,261 | 1,124 | 1,137 | 85 | 2 |
{-# LANGUAGE TemplateHaskell, Arrows, GADTs, TypeFamilies #-}
module Main where
import System.Exit
import Test.QuickCheck
import Control.Monad
import qualified Data.Set as S
import Data.Maybe
import Control.Arrow
import Automata.Types
import Automata.Combinators
import Automata.Helpers
data MyState = QStart | Q0 | ... | terrelln/automata | tests/properties.hs | mit | 3,613 | 1 | 15 | 1,715 | 955 | 503 | 452 | 61 | 3 |
module Parser(
Parser(..),
get,
put,
maybeParser,
maybeParsers,
tryParserOtherwise,
tryParsersOtherwise,
peek,
peeks,
word,
line
) where
import Control.Monad(when)
import Control.Applicative
import Data.Char(isSpace)
import Data.Monoid
newtype Parser a = P { runP :: String -> Either String (a,String) }
i... | kyle-ilantzis/Simple-ASM | Parser.hs | mit | 2,626 | 33 | 16 | 718 | 996 | 508 | 488 | 76 | 3 |
-- Copyright (c) 2012-2014 NVIDIA Corporation. All rights reserved.
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to u... | nvidia-compiler-sdk/hsnvvm | Setup.hs | mit | 1,191 | 0 | 4 | 196 | 30 | 25 | 5 | 2 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE LambdaCase #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Utils.FileUtils
-- Copyright : 2007-2011 Juergen Nick... | leksah/leksah-server | src/IDE/Utils/FileUtils.hs | gpl-2.0 | 32,029 | 0 | 31 | 8,434 | 8,531 | 4,323 | 4,208 | 600 | 6 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
{-
Copyright (C) 2006-2010 John MacFarlane <jgm@berkeley.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either vers... | castaway/pandoc | src/Text/Pandoc/Writers/HTML.hs | gpl-2.0 | 35,018 | 0 | 29 | 14,050 | 9,017 | 4,569 | 4,448 | 609 | 49 |
-- | Modified from / based on:
-- https://github.com/kig/tomtegebra/blob/master/Tomtegebra/Matrix.hs
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE PatternSynonyms #-}
module GLMatrix (
translationMatrix, frustumMatrix,
identityMatri... | jaredloomis/GLMatrix | GLMatrix.hs | gpl-3.0 | 8,068 | 0 | 13 | 1,820 | 2,718 | 1,548 | 1,170 | 191 | 1 |
flip :: (a -> b -> c) -> (b -> a -> c)
flip f y x = f x y | hmemcpy/milewski-ctfp-pdf | src/content/1.8/code/haskell/snippet27.hs | gpl-3.0 | 57 | 0 | 8 | 20 | 49 | 25 | 24 | 2 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/List.hs | mpl-2.0 | 3,051 | 0 | 13 | 709 | 408 | 242 | 166 | 60 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.MapsEngine
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla P... | rueshyna/gogol | gogol-maps-engine/gen/Network/Google/MapsEngine.hs | mpl-2.0 | 32,425 | 0 | 80 | 6,970 | 3,750 | 2,745 | 1,005 | 726 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-support/gen/Network/AWS/Support/DescribeCommunications.hs | mpl-2.0 | 6,648 | 0 | 12 | 1,362 | 892 | 527 | 365 | 92 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.ShoppingCon... | rueshyna/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | 443,650 | 0 | 82 | 111,082 | 84,246 | 48,248 | 35,998 | 9,527 | 1 |
module Common where
import System.IO.Temp
import System.Environment
import DMSS.Config
withTemporaryTestDirectory :: FilePath -> (FilePath -> IO a) -> IO a
withTemporaryTestDirectory t f = withSystemTempDirectory t ( \s -> do
-- Change HOME environment variable to temporary directory
setEnv "HOME" s
-- ... | dmp1ce/DMSS | src-test/Common.hs | unlicense | 410 | 0 | 10 | 85 | 89 | 47 | 42 | 9 | 1 |
module Identity where
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
newtype Identity a = Identity a deriving (Eq, Show)
instance Functor Identity where fmap f (Identity a) = Identity (f a)
instance Applicative Identity where
pure = Identity
Identity f <*> Identity a = Ide... | dmp1ce/Haskell-Programming-Exercises | Chapter 17/ApplicativeInstances/src/Identity.hs | unlicense | 858 | 0 | 9 | 130 | 259 | 140 | 119 | 16 | 1 |
{-# LANGUAGE GADTs #-}
module TutorialD.Interpreter.TransactionGraphOperator where
import TutorialD.Interpreter.Base
import ProjectM36.TransactionGraph hiding (autoMergeToHead)
import ProjectM36.Client as C
import ProjectM36.Base
import ProjectM36.Relation (relationTrue)
import Data.Functor
data ConvenienceTransaction... | agentm/project-m36 | src/bin/TutorialD/Interpreter/TransactionGraphOperator.hs | unlicense | 4,234 | 0 | 12 | 725 | 667 | 327 | 340 | 83 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Base64 where
import qualified Data.ByteString.Base64.URL as B64
import qualified Data.ByteString.Char8 as C
encode :: C.ByteString -> C.ByteString
encode = unpad . B64.encode
decode :: C.ByteString -> C.ByteString
decode bs = either error id $ B64.decode $ pad bs
pad ... | alexandrelucchesi/pfec | jwt-min/src/Base64.hs | apache-2.0 | 575 | 0 | 9 | 115 | 207 | 112 | 95 | 15 | 1 |
module HelperSequences.A000005 (a000005) where
import Helpers.Primes (primePowers)
a000005 :: Integer -> Integer
a000005 n = product $ map ((+1) . fromIntegral . snd) $ primePowers n
| peterokagey/haskellOEIS | src/HelperSequences/A000005.hs | apache-2.0 | 184 | 0 | 11 | 27 | 67 | 37 | 30 | 4 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANG... | dorchard/camfort | src/Language/Fortran/Model/Repr/Prim.hs | apache-2.0 | 8,234 | 0 | 13 | 1,723 | 1,651 | 879 | 772 | 172 | 14 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QFocusFrame.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:25
Warning : this file is machine generated - do n... | keera-studios/hsQt | Qtc/Gui/QFocusFrame.hs | bsd-2-clause | 44,637 | 0 | 14 | 7,194 | 14,490 | 7,347 | 7,143 | -1 | -1 |
import Controller
import Network.Wai.Handler.FastCGI (run)
main :: IO ()
main = withLounge run
| fortytools/lounge | fastcgi.hs | bsd-2-clause | 96 | 0 | 6 | 14 | 34 | 19 | 15 | 4 | 1 |
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE ExistentialQuantification, PatternSynonyms, PolyKinds, TypeOperators #-}
-- | Testing some pattern synonyms
module PatternSyns where
-- | FooType doc
data FooType x = FooCtor x
-- | Pattern synonym for 'Foo' x
pattern Foo x = FooCtor x
-- | Pattern synonym for 'Bar' x
patte... | haskell/haddock | html-test/src/PatternSyns.hs | bsd-2-clause | 851 | 0 | 8 | 162 | 179 | 96 | 83 | 13 | 0 |
{-# OPTIONS_GHC -Wall #-}
module Messages.Types where
-- inspired by:
-- https://wiki.haskell.org/Internationalization_of_Haskell_programs_using_Haskell_data_types
data Message
= ErrorsHeading
| ErrorFileLocation
| FilesWillBeOverwritten [FilePath]
| NoElmFilesFound [FilePath]
| TooManyInputSources
| Can... | fredcy/elm-format | src/Messages/Types.hs | bsd-3-clause | 386 | 0 | 7 | 48 | 46 | 30 | 16 | 10 | 0 |
import Debug.Trace
import FRP.Helm
import qualified FRP.Helm.Keyboard as Keyboard
import qualified FRP.Helm.Window as Window
import qualified FRP.Helm.Time as Time
data State = State { xpos :: Double, ypos :: Double,
xvel :: Double, yvel :: Double } deriving (Show)
data Impulse = Impulse { dx :: ... | ilkka/helm-learning | Main.hs | bsd-3-clause | 1,916 | 0 | 14 | 474 | 551 | 312 | 239 | 27 | 1 |
module Development.GCCxml.Types where
deepDeclarations = [
xml_NN_CASTING_OPERATOR
, xml_NN_CONSTRUCTOR
, xml_NN_DESTRUCTOR
, xml_NN_ENUMERATION
, xml_NN_FILE
, xml_NN_FUNCTION
, xml_NN_FREE_OPERATOR
, xml_NN_MEMBER_OPERATOR
, xml_NN_METHOD
, xml_NN_FUNCTION_TYPE
, xml_NN_M... | avaitla/Haskell-to-C---Bridge | src/GCCXML/Types.hs | bsd-3-clause | 2,221 | 0 | 5 | 277 | 363 | 222 | 141 | 76 | 1 |
module Lib
( Node
, createMaze
, renderMaze
, solveMaze
) where
import qualified Data.Map as Map
import qualified Data.Set as Set
import Data.Maybe
import Data.List (find, nub)
import System.Random (RandomGen, randomR, randomRs, split)
type Node = (Int, Int)
data Adjacent = LeftNode | UpNode | Bo... | ford-prefect/haskell-maze | src/Lib.hs | bsd-3-clause | 5,441 | 0 | 16 | 1,914 | 2,268 | 1,169 | 1,099 | 109 | 6 |
-- | Common handler functions.
module Handler.Common where
import Data.FileEmbed (embedFile)
import Import
-- These handlers embed files in the executable at compile time to avoid a
-- runtime dependency, and for efficiency.
getFaviconR :: Handler TypedContent
getFaviconR = return $ TypedContent "image/x-icon"
... | roggenkamps/steveroggenkamp.com | Handler/Common.hs | bsd-3-clause | 721 | 0 | 9 | 137 | 138 | 71 | 67 | 13 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
FlexibleInstances #-}
-- | The HeadTail class used for parsing with either strings or bytestrings.
module Data.HeadTail(HeadTail(..)) where
import qualified Data.ByteString.Lazy.Char8 as BS
class HeadTail l a | l -> a where
headTail :: l -> Maybe (a,l... | GaloisInc/sk-dev-platform | libs/SCD/src/Data/HeadTail.hs | bsd-3-clause | 546 | 0 | 10 | 109 | 168 | 91 | 77 | 12 | 0 |
module HGraph.Path where
import Control.Applicative
import Control.Monad.State
import qualified Data.Map as M
import qualified Data.Maybe as MB
import qualified Data.PQueue.Prio.Min as PQ
import qualified Data.Set as S
import HGraph.Edge
import ... | gpahal/hgraph | src/HGraph/Path.hs | bsd-3-clause | 9,410 | 0 | 19 | 3,459 | 3,687 | 1,923 | 1,764 | 144 | 5 |
module Math.Primes where
import Control.Monad
import Control.Monad.Random
import Math.Modular
millerRabinStep :: Integer -> Integer -> Bool
millerRabinStep a n =
if gcd a n /= 1
then a `mod` n == 0
else
let (r, d) = removeTwos (n-1)
base = modPow a d n
powers = take (fromIn... | bhamrick/hsmath | Math/Primes.hs | bsd-3-clause | 1,150 | 0 | 16 | 327 | 498 | 262 | 236 | 32 | 2 |
import System.Environment (getArgs)
age :: Int -> String
age i | i < 0 || i > 100 = "This program is for humans"
| i < 3 = "Still in Mama's arms"
| i < 5 = "Preschool Maniac"
| i < 12 = "Elementary school"
| i < 15 = "Middle school"
| i < 19 ... | nikai3d/ce-challenges | easy/age_distribution.hs | bsd-3-clause | 608 | 0 | 11 | 249 | 209 | 99 | 110 | 16 | 1 |
{-# LANGUAGE ScopedTypeVariables, DisambiguateRecordFields #-}
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
module Data.Octree.Internal(Vector3(..), dist,
Octree(..), lookup, nearest, withinRange, fromList, toList, insert,
-- internal
... | seppeljordan/octree | Data/Octree/Internal.hs | bsd-3-clause | 13,753 | 0 | 13 | 4,524 | 4,018 | 2,226 | 1,792 | 195 | 8 |
{-# LANGUAGE ViewPatterns, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-}
module HSE.Match where
import Data.Char
import HSE.Type
import HSE.Util
import qualified Language.Haskell.Exts as HSE_
class View a b where
view :: a -> b
data App2 = NoApp2 | App2 Exp_ Exp_ Exp_ deriving Show
insta... | bergmark/hlint | src/HSE/Match.hs | bsd-3-clause | 4,293 | 0 | 12 | 1,143 | 1,812 | 887 | 925 | 107 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Git.FastExport
import Git.FastExport.Filter
import Git.FastExport.AuthorFilter
import Git.FastExport.BShow
import Data.Conduit
import qualified Git.FastExport.Conduit as FE
import Data.Conduit.Binary
import System.IO (stdin, stdout)
import System.Exit
import ... | lumimies/git-fastexport-filter | src-main/Git-fastexport-filter.hs | bsd-3-clause | 2,436 | 20 | 17 | 423 | 686 | 384 | 302 | 53 | 2 |
module Domains.Negatable where
class Negatable a where
neg :: a -> a
instance Negatable Int where
neg = Prelude.negate
instance Negatable Integer where
neg = Prelude.negate
instance Negatable Double where
neg = Prelude.negate
| pmilne/algebra | src/Domains/Negatable.hs | bsd-3-clause | 238 | 0 | 7 | 45 | 69 | 37 | 32 | 9 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module ErrorMessages
(
tests
) where
import Prelude ()
import Prelude.Compat
import Data.Aeson (FromJSON(..), eitherDecode)
import Data.Proxy (Proxy(..))
import Instances ()
import Numeric.Natural (Natural)
import Test.Framework (Test)
i... | sol/aeson | tests/ErrorMessages.hs | bsd-3-clause | 2,035 | 0 | 15 | 412 | 679 | 345 | 334 | 58 | 2 |
module Parser where
import Text.Parsec
import Text.Parsec.String (Parser)
import qualified Text.Parsec.Expr as Ex
import qualified Text.Parsec.Token as Tok
import Data.Functor.Identity
import Syntax
-- Tokens
langDef :: Tok.LanguageDef ()
langDef = Tok.LanguageDef
{ Tok.commentStart = "{-"
, Tok.commentEnd ... | zanesterling/haskell-compiler | src/TypedPeanoArithmetic/Parser.hs | bsd-3-clause | 1,962 | 0 | 8 | 446 | 655 | 341 | 314 | 67 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Deal with downloading, cloning, or whatever else is necessary for
-- getting a 'PackageLocation' into something ... | MichielDerhaeg/stack | src/Stack/PackageLocation.hs | bsd-3-clause | 11,324 | 8 | 28 | 3,345 | 2,609 | 1,311 | 1,298 | 228 | 5 |
module Opaleye.Internal.QueryArr where
import Prelude hiding (id)
import qualified Opaleye.Internal.Unpackspec as U
import qualified Opaleye.Internal.Tag as Tag
import Opaleye.Internal.Tag (Tag)
import qualified Opaleye.Internal.PrimQuery as PQ
import qualified Opaleye.Internal.HaskellDB.PrimQuer... | silkapp/haskell-opaleye | src/Opaleye/Internal/QueryArr.hs | bsd-3-clause | 2,436 | 0 | 11 | 515 | 981 | 568 | 413 | 53 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- |
-- Module : Data.Array.Nikola.Language.Reify
-- Copyright : (c) The President and Fellows of Harvard College 2009-2010
-- Copyright : (c) Geoffrey Mainland 2012... | mainland/nikola | src/Data/Array/Nikola/Language/Reify.hs | bsd-3-clause | 4,329 | 0 | 16 | 1,197 | 1,535 | 807 | 728 | -1 | -1 |
-- {-# LANGUAGE MultiParamTypeClasses #-}
-- {-# LANGUAGE FlexibleInstances #-}
-- {-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DataKinds #-}
-- {-# LANGUAGE PolyKinds #-}
-- {-# LANGUAGE TypeFamilies #-}
module Opaleye.TF.Text where
import qualified Opaleye.Internal.Column as Op (Column (..), binO... | ocharles/opaleye-tf | src/Opaleye/TF/Text.hs | bsd-3-clause | 7,543 | 0 | 14 | 1,401 | 3,518 | 1,759 | 1,759 | 102 | 1 |
{-# OPTIONS_GHC -Wall #-}
module Transform.Canonicalize.Type (tipe) where
import Control.Arrow (second)
import Control.Applicative ((<$>),(<*>))
import Control.Monad.Error
import qualified Data.Map as Map
import Data.Traversable (traverse)
import qualified AST.Type as T
import qualified AST.Variable as Var
import Tr... | JoeyEremondi/utrecht-apa-p1 | src/Transform/Canonicalize/Type.hs | bsd-3-clause | 2,803 | 0 | 20 | 892 | 978 | 488 | 490 | 76 | 7 |
module Main where
import Control.Exception
import Control.Monad
import Network.Bluetooth
import Network.Socket
import System.Environment
import System.IO
import Utils
main :: IO ()
main = getArgs >>= \args -> case args of
addr:port:_ -> withSocketsDo $ client (read addr) (read port)
_ -> printUsage
... | bneijt/bluetooth | examples/rfcomm-client-no-sdp/Main.hs | bsd-3-clause | 1,682 | 0 | 18 | 550 | 429 | 207 | 222 | 40 | 2 |
module Koan.Monad where
import Prelude hiding (Monad, fmap, (<$), (<$>))
enrolled :: Bool
enrolled = False
class Applicative m => Monad m where
(>>=) :: m a -> (a -> m b) -> m b
(>>) :: m a -> m b -> m b
(>>) = error "TODO: Implement (>>)"
return :: a -> m a
return = error "TODO: Imp... | Kheldar/hw-koans | koan/Koan/Monad.hs | bsd-3-clause | 517 | 0 | 11 | 147 | 249 | 135 | 114 | 14 | 1 |
-- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
{-# LANGUAGE RankNTypes, LiberalTypeSynonyms #-}
-- This test checks that deep skolemisation and deep
-- instantiation work right. A buggy prototype
-- of GHC 7.0, where the type checker generated wrong
-- code, sent applyTypeToArgs into a loop.
module Twins whe... | rahulmutt/ghcvm | tests/suite/typecheck/compile/twins.hs | bsd-3-clause | 774 | 0 | 9 | 163 | 220 | 114 | 106 | 16 | 2 |
{-# LANGUAGE TypeFamilies, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, RankNTypes, GADTs, ScopedTypeVariables, FunctionalDependencies, RecursiveDo, UndecidableInstances, GeneralizedNewtypeDeriving, StandaloneDeriving, EmptyDataDecls, NoMonomorphismRestriction, TypeOperators, DeriveDataTypeable, PackageI... | nomeata/reflex-dom | src/Reflex/Dom/Internal.hs | bsd-3-clause | 12,160 | 0 | 20 | 2,311 | 3,727 | 1,883 | 1,844 | 215 | 1 |
-- | Takes the last item from a GitHub activity feed
{-# LANGUAGE OverloadedStrings #-}
module NumberSix.Handlers.GitHub
( handler
) where
--------------------------------------------------------------------------------
import Control.Monad.Trans (liftIO)
import Data.Text (Text... | itkovian/number-six | src/NumberSix/Handlers/GitHub.hs | bsd-3-clause | 1,504 | 0 | 16 | 356 | 302 | 159 | 143 | 28 | 2 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, CPP #-}
-- |This module provides a text-editing widget. Edit widgets can
-- operate in single- and multi-line modes.
--
-- Edit widgets support the following special keystrokes:
--
-- * Arrow keys to navigate the text
--
-- * @Enter@ - Activate single-line edit wid... | KommuSoft/vty-ui | src/Graphics/Vty/Widgets/Edit.hs | bsd-3-clause | 16,507 | 0 | 25 | 4,733 | 3,782 | 1,971 | 1,811 | 267 | 18 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
module Snap.Internal.Http.Server.Address
( getHostAddr
, getHostAddrImpl
, getSockAddr
, getSockAddrImpl
, getAddress
, getAddressImpl
, AddressNotSupportedExcep... | sopvop/snap-server | src/Snap/Internal/Http/Server/Address.hs | bsd-3-clause | 4,277 | 1 | 17 | 1,005 | 1,004 | 546 | 458 | 74 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Format (formatString) where
import qualified Data.ByteString.Char8 as B
import qualified TclObj as T
import Data.Char (chr)
import BSParse (pchar,(.>>),choose,emit,wrapWith,parseMany,parseLit
,getPred1
,(</>)
,pass
... | muspellsson/hiccup | Format.hs | lgpl-2.1 | 1,769 | 0 | 12 | 566 | 675 | 366 | 309 | 39 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Shaders.ProgramObjects
-- Copyright : (c) Sven Panne 2006-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : port... | hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GL/Shaders/ProgramObjects.hs | bsd-3-clause | 6,267 | 0 | 14 | 902 | 1,067 | 576 | 491 | 88 | 2 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude
, BangPatterns
, NondecreasingIndentation
#-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.IO.Encoding.Latin1
-- Copyright : (c) ... | lukexi/ghc | libraries/base/GHC/IO/Encoding/Latin1.hs | bsd-3-clause | 5,132 | 0 | 19 | 1,719 | 1,300 | 708 | 592 | 106 | 3 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.TabBarDecoration
-- Copyright : (c) 2007 Andrea Rossato
-- License : BSD-style (see xmonad/LICENSE)
--
-- Maintainer : andrea.rossato@uni... | pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Layout/TabBarDecoration.hs | bsd-2-clause | 2,993 | 0 | 16 | 656 | 603 | 340 | 263 | 32 | 1 |
{-# LANGUAGE TypeFamilies, DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-}
{-# OPTIONS_GHC -fplugin GHC.TypeLits.KnownNat.Solver #-}
{-# OPTIONS_GHC -fconstraint-solver-iterations=20 #-}
module AI.Funn.Network.Mixing (amixLayer) wh... | nshepperd/funn | AI/Funn/Network/Mixing.hs | mit | 1,210 | 0 | 14 | 270 | 283 | 172 | 111 | 26 | 1 |
{-# htermination index :: (Ordering,Ordering) -> Ordering -> Int #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_index_5.hs | mit | 69 | 0 | 2 | 10 | 3 | 2 | 1 | 1 | 0 |
module Main where
main :: IO ()
main = putStrLn "Test suite not yet implemented"
| loganbraga/hunch | test/Spec.hs | mit | 82 | 0 | 6 | 16 | 22 | 12 | 10 | 3 | 1 |
module GHCJS.DOM.NavigatorUserMediaErrorCallback (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/NavigatorUserMediaErrorCallback.hs | mit | 61 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
module Language.LSP.Types.Progress where
import Control.Monad (unless)
import qualified ... | wz1000/haskell-lsp | lsp-types/src/Language/LSP/Types/Progress.hs | mit | 7,625 | 0 | 16 | 1,562 | 1,238 | 689 | 549 | 115 | 0 |
-- we want to use `functionDefaults` and `globalVariableDefaults` and so on without warnings
-- (maybe it would be better if llvm-hs split these out into their own types so the record updates
-- would not be incomplete, but ¯\_(ツ)_/¯)
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
module LLVM (translateFunctions, ... | glaebhoerl/stageless | src/LLVM.hs | mit | 19,549 | 0 | 22 | 5,251 | 5,491 | 2,848 | 2,643 | -1 | -1 |
{-# htermination (ltOrdering :: Ordering -> Ordering -> MyBool) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data Ordering = LT | EQ | GT ;
compare0 x y MyTrue = GT;
otherwise :: MyBool;
otherwise = MyTrue;
compare1 x y MyTrue = LT;
compare1 x y MyFalse = ... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/LT_6.hs | mit | 1,311 | 0 | 8 | 262 | 466 | 253 | 213 | 36 | 1 |
module Rebase.System.IO.Error
(
module System.IO.Error
)
where
import System.IO.Error
| nikita-volkov/rebase | library/Rebase/System/IO/Error.hs | mit | 89 | 0 | 5 | 12 | 23 | 16 | 7 | 4 | 0 |
{-
- Run-length encoding of a list (direct solution).
- Implement the so-called run-length encoding data compression method
- directly, i.e. don't explicitly create the sublists containing the
- duplicates, as in problem 9, but only count them. As in problem 11,
- simplify the result list by replacing the singleton lis... | LucianU/99problems | P13.hs | mit | 634 | 0 | 10 | 130 | 157 | 82 | 75 | 8 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE QuasiQuotes #-}
module Dotfiles.PostInstall (postInstall) where
import System.Directory
import System.FilePath
import System.Process
import Control.Monad
import Data.Maybe
import Dotfiles.Core
import ... | owickstrom/dotfiles | src/Dotfiles/PostInstall.hs | mit | 870 | 0 | 10 | 198 | 230 | 119 | 111 | 24 | 1 |
{- This module was generated from data in the Kate syntax
highlighting file djangotemplate.xml, version 1.3, by Matthew Marshall (matthew@matthewmarshall.org) -}
module Text.Highlighting.Kate.Syntax.Djangotemplate
(highlight, parseExpression, syntaxName, syntaxExtensions)
where
import Text.Highlighting.Ka... | ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Djangotemplate.hs | gpl-2.0 | 27,383 | 0 | 27 | 4,100 | 7,488 | 4,020 | 3,468 | 467 | 42 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : ./Comorphisms/SuleCFOL2SoftFOL.hs
Description : Coding of a CASL subset into SoftFOL
Copyright : (c) Klaus Luettich and Uni Bremen 2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : luecke@informati... | spechub/Hets | Comorphisms/SuleCFOL2SoftFOL.hs | gpl-2.0 | 46,238 | 0 | 31 | 16,677 | 13,742 | 7,000 | 6,742 | 886 | 17 |
module Dates (
daysInMonths,
leapYear,
yearToDays,
Day(..),
Month(..)
) where
import Primes(divides)
import Util(runningTotal)
data Day = Sunday
| Monday
| Tuesday
| Wednesday
| Thursday
| Friday
| Saturday
deriving (Show, Enum, Bounde... | liefswanson/projectEuler | src/Dates.hs | gpl-2.0 | 1,715 | 0 | 10 | 627 | 535 | 298 | 237 | 63 | 2 |
{-# LANGUAGE LambdaCase, OverloadedStrings, ExtendedDefaultRules, TupleSections #-}
module LexiconEditor (
LexRow(..), createEditableLexicon, segsFromFt
) where
import Graphics.UI.Gtk
import Control.FRPNow hiding (swap, when)
import Control.FRPNow.GTK
import Control.Monad
import Control.Exception
import Data.Fold... | george-steel/maxent-learner | maxent-learner-hw-gui/app/LexiconEditor.hs | gpl-2.0 | 9,491 | 0 | 24 | 2,519 | 2,641 | 1,264 | 1,377 | 189 | 7 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Json
(
Journal(..)
, Notifications(..)
, J.PostList(..)
, ApiError(..)
) where
import Data.Aeson
import Data.Text (Text, pack)
import Control.Applicative
import Control.Monad
import qualified Data.HashMap.Strict as HMS
import qua... | capgelka/hapidry | src/Json.hs | gpl-2.0 | 2,070 | 0 | 15 | 593 | 589 | 331 | 258 | 53 | 0 |
{-| Implementation of the Ganeti confd server functionality.
-}
{-
Copyright (C) 2011, 2012, 2013 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(a... | vladimir-ipatov/ganeti | src/Ganeti/Confd/Server.hs | gpl-2.0 | 11,755 | 0 | 19 | 2,864 | 2,892 | 1,474 | 1,418 | 209 | 13 |
module Commons where
import Affection
import GEGL as G
import qualified SDL
import qualified Data.Map as M
import Types
import Debug.Trace
updateClockString :: Affection UserData ()
updateClockString = do
ud <- getAffection
let hours = floor (tminus ud / 3600) :: Int
hx = show $ hours `div` 10
... | nek0/countdown.hs | src/Commons.hs | gpl-3.0 | 1,671 | 0 | 22 | 564 | 577 | 302 | 275 | 53 | 2 |
{-
Copyright (C) 2015 Michael Dunsmuir
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program i... | mdunsmuir/routequery-service | src/Historian.hs | gpl-3.0 | 3,249 | 3 | 13 | 600 | 763 | 390 | 373 | 61 | 2 |
{- |
Module : Sound.FModEx.Raw.DSP
Description : DSP FModEx library Haskell raw binding
Copyright : (c) Dimitri Sabadie
License : GPL-3
Maintainer : dimitri.sabadie@gmail.com
Stability : experimental
Portability : Linux only for now
DSP FModEx raw Haskell API.
-}
module Sound.FModEx.Raw.DSP (
... | phaazon/hsFModEx | Sound/FModEx/Raw/DSP.hs | gpl-3.0 | 381 | 0 | 4 | 81 | 25 | 19 | 6 | 3 | 0 |
module Server where
import Happstack.Server ( simpleHTTP
, nullConf )
import Happstack.Server.ClientSession ( getDefaultKey
, sessionPath
, withClientSessionT
... | MortimerMcMire315/sparkive | src/Server.hs | gpl-3.0 | 561 | 0 | 10 | 259 | 94 | 51 | 43 | 13 | 1 |
module HW1 where
--Data
------
type RealName = String
type UserName = String
type GroupName = String
type Message = String
data Post = Post UserName Message deriving (Show, Eq)
data To = UserID UserName | GroupID GroupName deriving (Show, Eq)
data User = User UserName RealName [UserName] [Post] deriving (Sho... | kadircet/CENG | 242/hw1/tester/HW1-Kopya.hs | gpl-3.0 | 6,377 | 32 | 16 | 1,087 | 2,864 | 1,496 | 1,368 | 116 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.